package com.hongbao.game.service;

import org.springframework.stereotype.Component;

@Component
public class OptimisticLock_DB {

    //LOCK table
    // id   name version
    public Integer getLock(String name){
        //select max(version) from tb_lock_table where name  = ${name}
        return 11;
    }

    public boolean releaseLock(String name,Integer expe_version){
        //update tb_lock_table set version = version+1
        //              where version= ${expe_version} and name  = ${name}
        return true;
    }


}
